<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>修改赛事</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../js/xadmin.js"></script>
    <script src="../js/base.js"></script>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/vue.min.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .juese {
            text-align: center;
            width: 90%;
            border: 1px solid #ccc;
            margin: 20px auto;
        }

        .juese th {
            text-align: center;
            background: #fff;
        }

        .layui-row .juese .layui-table td,
        .layui-row .juese .layui-table th {
            font-size: 14px;
        }

        .layui-col-md4 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md4 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md3 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md3 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md5 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md5 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-col-md6 label {
            width: 30%;
            padding: 9px 0;
            font-size: 14px;
            color: #999;
        }

        .layui-col-md6 div {
            line-height: 38px;
            width: 70%;
            text-align: left;
            font-size: 14px;
            box-sizing: border-box;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            padding-left: 10px;
        }

        .layui-input-inline {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        [v-cloak] {
            display: none;
        }

        .layui-table th {
            background-color: #f2f2f2;
        }
    </style>
</head>

<body>
    <div class="layui-fluid" id="All_List">
        <div class="layui-row" v-cloak>
            <form class="layui-form">
                <div style="text-align: center;font-size: 16px;">角色信息</div>
                <div class="juese">
                    <table class="layui-table" lay-skin="nob">
                        <colgroup>
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <thead>
                            <tr>
                                <th style="color: #999;">所属球队</th>
                                <th></th>
                                <th></th>
                                <!-- <th width="25%">裁判等级</th>
                        <th width="25%">裁判监督等级</th>
                        <th width="25%">裁判讲师等级</th> -->
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td id="juese">{{teamName}}</td>
                                <td></td>
                                <td></td>
                                <!-- <td>一级</td>
                        <td>一级</td>
                        <td>一级</td> -->
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div style="text-align: center;font-size: 16px;">个人信息</div>
                <div class="juese layui-row">
                    <div class="layui-col-md10">
                        <div style="padding:20px 20px 0 20px;overflow: hidden;">
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">用户ID：</label>
                                <div class="layui-input-inline" id="id">{{id}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">姓名：</label>
                                <div class="layui-input-inline" id="name">{{name}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">性别：</label>
                                <div class="layui-input-inline" id="sex">{{sexName}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">证件类型：</label>
                                <div class="layui-input-inline" id="documentType">{{documentTypeName}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">证件号码：</label>
                                <div class="layui-input-inline" id="documentNumber">{{documentNumber}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">等级：</label>
                                <div class="layui-input-inline" id="level">{{level}}级</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">身高：</label>
                                <div class="layui-input-inline" id="height">{{height}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">体重：</label>
                                <div class="layui-input-inline" id="weight">{{weight}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">血型：</label>
                                <div class="layui-input-inline" id="bloodType">{{bloodTypeName}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">国籍：</label>
                                <div class="layui-input-inline" id="nationality">{{nationality}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">民族：</label>
                                <div class="layui-input-inline" id="nation">{{nation}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">教育程度：{{heightEducation}}</label>
                                <div class="layui-input-inline" id="heightEducation">
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">出生地：</label>
                                <div class="layui-input-inline" id="birthAddress">{{birthAddress}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">出生日期：</label>
                                <div class="layui-input-inline" id="birthDay">{{birthDay}}</div>
                            </div>
                            <!-- <div class="layui-inline layui-col-md4">
                            <label class="layui-form-label">政治面貌：</label>
                            <div class="layui-input-inline" id="politicCountenance">
                            </div>
                        </div> -->
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">体检时间：</label>
                                <div class="layui-input-inline" id="year">
                                    {{name}}
                                </div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">电子邮箱：</label>
                                <div class="layui-input-inline" id="email">{{email}}</div>
                            </div>
                            <div class="layui-inline layui-col-md4">
                                <label class="layui-form-label">联系方式：</label>
                                <div class="layui-input-inline" id="tel">{{tel}}</div>
                            </div>
                            <!-- <div class="layui-inline layui-col-md4">
                            <label class="layui-form-label">其他电话：</label>
                            <div class="layui-input-inline" id="otherTel">
                            </div>
                        </div> -->
                        </div>
                    </div>
                    <div class="layui-col-md2">
                        <div style="width: 118px;height:138px;margin-top: 40px;">
                            <img id="headPhoto" style="width: 100%;height:100%;" :src="headPhoto" alt="">
                        </div>
                    </div>
                    <div class="layui-col-md12" style="padding: 0 20px 20px 20px;">
                        <div style="width: 100%;">
                            <label class="layui-form-label" style="color: #999;width: 6.9%;">比赛经历：</label>
                            <div class="layui-input-inline" style="width: 80%;">
                                <table id="application_table" lay-filter="test" lay-data="{id: 'testReload'}">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="text-align: center;font-size: 16px;">履历</div>
                <div class="juese layui-row">
                    <div class="layui-col-md12">
                        <div style="padding:20px;overflow: hidden;">
                            <table id="application_table2" lay-filter="test2" lay-data="{id: 'testReload2'}">
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" style="text-align: center">
                    <button type="button" class="layui-btn" onclick="xadmin.close()">关闭页面</button>
                </div>
            </form>
        </div>
    </div>
</body>
<script>
    var valId, data = [];


    window.onbeforeunload = function (event) {

    }

    window.onunload = function (event) {

    }


    function child(id) {
        valId = id;
        layui.use(['form', 'table'], function () {
            var table = layui.table;
            //实例

            var app = new Vue({
                el: "#All_List",
                data: {
                    id: "",
                    teamName: "",
                    birthDay: '',
                    documentTypeName: '',
                    nation: '',
                    documentNumber: '',
                    level: '',
                    sexName: '',
                    heightEducation: "",
                    weight: '',
                    bloodType: '',
                    headPhoto: '',
                    nationality: '',
                    name: '',
                    birthAddress: '',
                    tel: "",
                    email: "",
                    height: "",
                    playerExperienceList: "",
                    sex: "",
                    documentType: "",
                    bloodTypeName: "",
                },
                methods: {
                    index: function () {
                        this.ajaxGetPlayer()
                        this.getExp()
                    },
                    ajaxGetPlayer: function () { //获取球员信息
                        var that = this
                        $.ajax({
                            url: findPlayerById,
                            type: 'get',
                            data: {
                                id: valId
                            },
                            dataType: 'json',
                            success: function (data) {
                                if (data.msg == 0) {
                                    that.teamName = data.user.teamName,
                                        that.id = data.user.id,
                                        that.birthDay = data.user.birthDay,
                                        that.documentTypeName = data.user
                                        .documentTypeName,
                                        that.nation = data.user.nation,
                                        that.documentNumber = data.user.documentNumber,
                                        that.level = data.user.level,
                                        that.sexName = data.user.sexName,
                                        that.heightEducation = data.user
                                        .heightEducation,
                                        that.weight = data.user.weight,
                                        that.bloodType = data.user.bloodType,
                                        that.headPhoto = data.user.headPhoto,
                                        that.nationality = data.user.nationality,
                                        that.name = data.user.name,
                                        that.birthAddress = data.user.birthAddress,
                                        that.tel = data.user.tel,
                                        that.email = data.user.email,
                                        that.height = data.user.height,
                                        that.playerExperienceList = data.user
                                        .playerExperienceList,
                                        that.sex = data.user.sex,
                                        that.documentType = data.user.documentType,
                                        that.bloodTypeName = data.user.bloodTypeName;
                                    var data = data.playerExperienceList;
                                    table.render({
                                        elem: '#application_table2', //指定原始表格元素选择器（推荐id选择器）
                                        width: "100%",
                                        data: data,
                                        skin: 'line',
                                        page: true, //开启分页
                                        // toolbar: 'default', //开启工具栏，此处显示默认图标
                                        limit: 10,
                                        limits: [10, 20, 30, 50, 100],
                                        cols: [
                                            [ //表头

                                                {
                                                    field: 'teamName',
                                                    title: '所在球队',
                                                    width: 200
                                                },
                                                {
                                                    field: 'num',
                                                    title: '号码',
                                                    width: 200
                                                },
                                                {
                                                    field: 'date',
                                                    title: '时间',
                                                    width: 200
                                                },
                                                {
                                                    field: 'remark',
                                                    title: '备注',
                                                    width: 200
                                                }
                                            ]
                                        ],
                                        id: 'testReload2',
                                        done: function (res) {

                                        }
                                    });

                                } else {
                                    layer.alert(data.msg, {
                                        title: '提示'
                                    })
                                }
                            },
                            error: function (data) {
                                layer.alert(data.msg, {
                                    title: '提示'
                                })
                            }
                        });
                    },
                    getExp: function () { //获取球员经历
                        $.ajax({
                            url: getPlayerExperience,
                            type: 'get',
                            data: {
                                playerId: valId
                            },
                            dataType: 'json',
                            success: function (data) {
                                if (data.msg == 0) {
                                    data = data.competitionDataByPlayerId;
                                    table.render({
                                        elem: '#application_table', //指定原始表格元素选择器（推荐id选择器）
                                        width: "100%",
                                        data: data,
                                        page: true, //开启分页
                                        // toolbar: 'default', //开启工具栏，此处显示默认图标
                                        limit: 10,
                                        limits: [10, 20, 30, 50, 100],
                                        cols: [
                                            [ //表头
                                                // {
                                                //     type: 'checkbox',
                                                //     fixed: 'left'
                                                // },
                                                {
                                                    field: 'competitionName',
                                                    title: '赛事',
                                                    width: 100
                                                },
                                                {
                                                    field: 'dateTime',
                                                    title: '时间',
                                                    width: 100
                                                },
                                                {
                                                    field: 'ownTeamName',
                                                    title: '代表球队',
                                                    width: 100
                                                },
                                                {
                                                    field: 'positionName',
                                                    title: '场上司职',
                                                    width: 100
                                                },
                                                {
                                                    field: 'clothesNum',
                                                    title: '球衣',
                                                    width: 100,
                                                    templet: function (d) {
                                                        return (d
                                                            .clothesNum +
                                                            "号")
                                                    }
                                                },
                                                {
                                                    field: 'score',
                                                    title: '比分',
                                                    width: 100
                                                },
                                                {
                                                    field: 'assistantTeamName',
                                                    title: '对手',
                                                    width: 100
                                                },
                                                {
                                                    field: 'isFirstOn',
                                                    title: '首发',
                                                    width: 100
                                                },
                                                {
                                                    field: 'minutes',
                                                    title: '出场',
                                                    width: 100
                                                },
                                                {
                                                    field: 'goal',
                                                    title: '进球',
                                                    width: 100
                                                },
                                                {
                                                    field: 'getCard',
                                                    title: '得牌',
                                                    width: 100
                                                },
                                                {
                                                    field: 'remark',
                                                    title: '备注',
                                                    width: 100
                                                }


                                            ]
                                        ],
                                        id: 'testReload',
                                        done: function (res) {

                                        }
                                    });

                                } else {
                                    layer.alert(data.msg, {
                                        title: '提示'
                                    })
                                }
                            },
                            error: function (data) {
                                layer.alert(data.msg, {
                                    title: '提示'
                                })
                            }
                        });
                    },

                },
                created: function () {
                    this.index()
                }
            })

        })

    };
</script>

</html>